<?php
/**
 * @Name  : RoleModel.php
 * @Author: yashuai<1762910894@qq.com>
 */

namespace App\Http\Model\Rbac;

use App\Http\Model\BaseModel;

class RoleModel extends BaseModel
{

    protected $primaryKey = 'RoleID';

    protected $table      = 'admin_role';

    public function node()
    {
        return $this->hasMany(RoleNodeModel::class, 'RoleID', 'RoleID')
            ->select(['RoleID', 'NodeID']);
    }

}
